
import pandas as pd
import numpy as np

import matplotlib.pyplot as plt

np.random.seed(0)

# **********  序列数据显示 ***************
data = pd.Series(np.random.randn(1000), index=np.arange(1000))
data = data.cumsum()

# data.plot()
# plt.show()

# **************** dataFrame数据显示 ****************
"""
显示的方法包括："bar", "hist", "dke", "area", "scatter", "hexbin", "pie"
"""
data = pd.DataFrame(np.random.randn(1000, 4),
                    index=np.arange(1000),
                    columns=["A", "B", "C", "D"])
data = data.cumsum()

# plot可以指定颜色等参数
# data.plot()
# plt.show()

"""
scatter方法有问题，scatter(ax=ax)报错
"""
ax = data.plot().scatter(x="A", y="B", color="Red", label="c-1")
data.plot().scatter(x="A", y="D", color="Blue", label="c-2")
plt.show()
# ***********